package kordegi.forumsystem.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @author kordegi
 * @date 2022.05.06 14:21
 * @Description
 */

@Data
@ToString
public class Comment {

    @NotBlank(message = "评论id不能为空")
    private Long id;

    @NotBlank(message = "用户id不能为空")
    private Long userId;

    @NotBlank(message = "文章id不能为空")
    private Long articleId;

    @NotBlank(message = "用户名不能为空")
    private String username;

    private String avatar;

    @NotBlank(message = "评论id不能为空")
    private String content;

    private Long parentId;

    private Integer commentNum;

    private Integer likeCount;

    private Boolean isLike;

    private String likeListId;

    private Boolean inputShow;

    private LocalDateTime created;

    private Long fromId;

    private String fromName;

    private Boolean isDeleted;

    private List<Comment> reply;
}
